<div class="menu" style="margin-top: 120px;">
    <span>导出</span>
    <a href="javascript:;" id="link_import">导入</a>
</div>
<div class="form">
    <div class="line">
        <span>分类：</span>
        <select id="cid">
            <option value="0">所有书签</option>
            <!--{foreach($categoryList as $v)}-->
            <option value="<!--{$v['id']}-->"><!--{:H($v['name'])}--></option>
            <!--{/foreach}-->
        </select>
    </div>
    <div class="line">
        <span>&nbsp;</span>
        <a href="javascript:;" id="link_export_submit">导出</a>
        <a href="javascript:;" onclick="hideAction()">取消</a>
    </div>
</div>
<script type="text/javascript">
$("#link_import").click(function() {
    showAction("<!--{:Router::buildUrl('Link_Import')}-->");
});

$("#link_export_submit").click(function() {
    var cid = $("#cid").val();
    el = $(this);
    var href = el.attr("href");
    el.attr("target", "_blank");
    el.attr("href", "<!--{:Router::buildUrl('Link_Export', array('cid' => '[cid]'))}-->".replace("[cid]", cid));
    setTimeout(function() {
        el.removeAttr("target");
        el.attr("href", href);
    }, 100);
});
</script>

